package cc.spider.web;

import cc.spider.core.queue.PriorityQueue;
import cc.spider.model.SpiderConfig;
import cc.spider.web.datapipes.ConsoleDataPipe;
import cc.spider.web.fetcher.OkHttpFetcher;
import cc.spider.web.model.GlobalDefaultDataExt;
import cc.spider.web.processor.BaiduSearchPageProcess;
import cc.spider.web.queue.UniquePriorityQueue;

public class WebSpiderConfig extends SpiderConfig {
    public WebSpiderConfig(){
        this.init();
    }
    private void init(){
        this.setFetcher(new OkHttpFetcher());
        this.setTaskQueue(new UniquePriorityQueue());
        this.setDataProcess(new BaiduSearchPageProcess());
        this.addDataPipe(new ConsoleDataPipe());
        this.setGlobalDefaultData(new GlobalDefaultDataExt());
    }
}
